tiles = {
         front = { "data/sprites/trev/front.bmp" },
         back  = { "data/sprites/trev/back.bmp" },
         left  = { "data/sprites/trev/left.bmp" },
         right  = { "data/sprites/trev/right.bmp" },
         walk_front = {
                       "data/sprites/trev/walk_front_1.bmp",
                       "data/sprites/trev/walk_front_2.bmp",
                       "data/sprites/trev/walk_front_3.bmp",
                       "data/sprites/trev/walk_front_4.bmp"
                      },
         walk_back  = {
                       "data/sprites/trev/walk_back_1.bmp",
                       "data/sprites/trev/walk_back_2.bmp",
                       "data/sprites/trev/walk_back_3.bmp",
                       "data/sprites/trev/walk_back_4.bmp"
                      },
         walk_left  = {
                       "data/sprites/trev/walk_left_1.bmp",
                       "data/sprites/trev/walk_left_2.bmp",
                       "data/sprites/trev/walk_left_3.bmp",
                       "data/sprites/trev/walk_left_4.bmp"
                      },
         walk_right  = {
                       "data/sprites/trev/walk_right_1.bmp",
                       "data/sprites/trev/walk_right_2.bmp",
                       "data/sprites/trev/walk_right_3.bmp",
                       "data/sprites/trev/walk_right_4.bmp"
                      }
        }

function onLoad (spriteID, x, y)
	
	setName(spriteID, "Trevor")
	moveTo(spriteID, 5, 5)
	
end

function arriveAt (spriteID, x, y)

	if x == 5 and y == 5 then
		moveTo(spriteID, 5, 6)
	end
	
	if x == 5 and y == 6 then
		say_result = say(spriteID, "Well hello, testing out speech bubbles! I do hope they work splendidly well!")
		if say_result then
			print ("say success")
		else
			print ("say failure")
		end
	end
	
end
